/*
 * 文件名：OrderDetailInfoService.java
 * 版权：Copyright by www.huawei.com
 * 描述：
 * 修改人：zhangshaohua
 * 修改时间：2016年4月28日
 * 跟踪单号：
 * 修改单号：
 * 修改内容：
 */

package com.zcsy.manage.service.mall.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zcsy.manage.model.dmall.vo.OrderCount;
import com.zcsy.manage.model.dmall.vo.OrderData;
import com.zcsy.manage.model.mall.OrderDetailInfo;
import com.zcsy.manage.model.mall.OrderDetailInfoView;
import com.zcsy.manage.persistence.mall.OrderDetailInfoDao;
import com.zcsy.manage.service.mall.IOrderDetailInfoService;

@Service
public class OrderDetailInfoService implements IOrderDetailInfoService{

	@Autowired
	private OrderDetailInfoDao orderDetailInfoDao;
	
	@Override
	public int insert(OrderDetailInfo orderDetailInfo) {
		return orderDetailInfoDao.insert(orderDetailInfo);
	}

	@Override
	public int update(OrderDetailInfo orderDetailInfo) {
		return orderDetailInfoDao.update(orderDetailInfo);
	}

	@Override
	public OrderDetailInfo selectByPrimaryKey(String id) {
		return orderDetailInfoDao.selectByPrimaryKey(id);
	}

	@Override
	public int deleteByPrimaryKey(String id) {
		return orderDetailInfoDao.deleteByPrimaryKey(id);
	}

	@Override
	public int deleteByOrderId(String orderId) {
		return orderDetailInfoDao.deleteByOrderId(orderId);
	}

	@Override
	public List<OrderDetailInfoView> getByOrderId(String orderId) {
		return orderDetailInfoDao.getByOrderId(orderId);
	}

	@Override
	public List<OrderDetailInfo> getOrderDetailInfos(String orderId) {
		return orderDetailInfoDao.getOrderDetailInfos(orderId);
	}
	
	@Override
	public List<OrderDetailInfo> getOrderDetailInfosByParentOrder(String orderId) {
		return orderDetailInfoDao.getOrderDetailInfosByParentOrder(orderId);
	}
	
	@Override
	public List<OrderDetailInfo>  getGoodsDetailByOrderId(String orderId) {
		return orderDetailInfoDao.getGoodsDetailByOrderId(orderId);
	}

	@Override
    public List<OrderData> getSalesAmountByShopId(Map map) {
        return orderDetailInfoDao.getSalesAmountByShopId(map);
    }
	
	@Override
	public OrderCount getSalesAmountDataCount(Map map) {
	    return orderDetailInfoDao.getSalesAmountDataCount(map);
	}
	
	@Override
	public List<OrderData> getSalesMoneyByShopId(Map map) {
	    return orderDetailInfoDao.getSalesMoneyByShopId(map);
	}
	
	@Override
	public OrderCount getSalesMoneyDataCount(Map map) {
	    return orderDetailInfoDao.getSalesMoneyDataCount(map);
	}
	
	@Override
    public List<OrderData> getSalesOrderNumByShopId(Map map) {
        return orderDetailInfoDao.getSalesOrderNumByShopId(map);
    }
    
    @Override
    public OrderCount getSalesOrderNumDataCount(Map map) {
        return orderDetailInfoDao.getSalesOrderNumDataCount(map);
    }

    @Override
	public List<OrderDetailInfo> getOrderDetailWhenFirst(String orderId){
    	return orderDetailInfoDao.getOrderDetailWhenFirst(orderId);
	}
}
